package nc.bs.common.util;

import nc.vo.pub.lang.UFDouble;

import java.math.BigDecimal;

/**
 * @author duanyp1
 * @date 2024/1/18 9:58
 */
public class ValueUtil {

    public static UFDouble getUFDouble(Object obj) {
        UFDouble val = null;
        if (obj instanceof UFDouble) {
            val = (UFDouble) obj;
        } else if (obj instanceof String) {
            val = new UFDouble((String) obj);
        } else if (obj instanceof BigDecimal) {
            val = new UFDouble((BigDecimal) obj);
        } else if (obj instanceof Integer) {
            val = new UFDouble((Integer) obj);
        }
        return val;
    }


}
